from app import BAST_URL, VERTIFY_URL, MAIN_URL


class LoginApi:
    def __init__(self):
        self.base_url = BAST_URL
        self.session_url = VERTIFY_URL
        self.main_url = MAIN_URL

    def get_vertify(self, session):
        response = session.get(self.session_url)
        return response

    def get_login(self, session, username, password, vertify):
        data1 = {'username': username,
                 'password': password,
                 'vertify': vertify}
        response = session.post(url=BAST_URL,
                                json=data1)

        return response

    def get_login_success(self,session,url):
        url = self.main_url + url
        response = session.get(url)
        return response
